import { createStore } from 'vuex'
import user from './modules/user'
import cart from './modules/cart'
import createPersistedstate from 'vuex-persistedstate'

export default createStore({
  state: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    user,
    cart
  },
  plugins: [
    createPersistedstate({
      key: 'rabbit-key',
      paths: ['user', 'cart']// 想把哪个模块中的数据进行持久化,就把模块名写过来
    })
  ]
})
